// JavaScript Document
function validate_required(field,alerttxt)
{
with (field)
  {
  if (value==null||value=="")
    {alert(alerttxt);return false}
  else {return true}
  }
}
function validate_form(thisform)
{
with (thisform)
  {
  if (validate_required(stu_name,"用户名不能为空!")==false)
    {stu_name.focus();return false}
   if (validate_required(stu_pwd,"密码不能为空!")==false)
    {stu_pwd.focus();return false}
   if (validate_required(stu_ver,"验证码不能为空!")==false)
    {stu_ver.focus();return false}
    
  }
}
function validate_register(register)
{
with (register)
  {
  if (validate_required(stu_name,"用户名不能为空!")==false)
    {stu_name.focus();return false}
   if (validate_required(stu_pwd,"密码不能为空!")==false)
    {stu_pwd.focus();return false}
   if (validate_required(stu_pwds,"密码不能为空!")==false)
    {stu_pwds.focus();return false}
     if (validate_required(stu_phone,"电话不能为空!")==false)
    {stu_phone.focus();return false}
     if (validate_required(stu_email,"邮箱能为空!")==false)
    {stu_email.focus();return false}
     if (validate_required(stu_school,"学校不能为空!")==false)
    {stu_school.focus();return false}
    
    
  }
}